package com;

import com.coderknok.interfaces.HelloWorldInterface;

import java.util.ServiceLoader;

/**
 * <p></p>
 *
 * @author 三产
 * @version 1.0
 * @date 2017-11-10
 * @QQGroup 213732117
 * @website http://www.coderknock.com
 * @copyright Copyright 2017 拿客 coderknock.com  All rights reserved.
 * @since JDK 1.8
 */
public class Test {
    public static void main(String[] args) {
        ServiceLoader<HelloWorldInterface> serviceLoaders = ServiceLoader.load(HelloWorldInterface.class);
        serviceLoaders.forEach(helloWorldInterface ->
                helloWorldInterface.sayHello()
        );
    }
}
